<template>
  <div class="nav-header">
    <img
      width="50"
      height="50"
      src="../../assets/imgs/logo.png"
      alt=""
    />
    <span v-if="collapse">源码商家外卖中心</span>
    <!-- <span v-if="$store.state.navHeader.collapse">源码商家外码中心</span> -->
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  computed: {
    ...mapState({
      collapse: (state) => state.navHeader.collapse
    })
  }
}
</script>
<style lang="scss" scoped>
.nav-header {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  span{
    overflow: hidden;
    white-space: nowrap;
  }
}
</style>
